package com.softeem.xyblogmaster.util;



//在拦截器里面用 39行ThreadContext.setItem(token);
//确认该用户的token为有效的情况下，将token存放到线程变量里
public class ThreadContext {
    private static ThreadLocal<String> stringThreadLocal = new ThreadLocal<>();

    public static void  setItem(String token){
        stringThreadLocal.set(token);
    }

    public static String getItem(){
        return stringThreadLocal.get();
    }

    public static void  removeItem(){
        stringThreadLocal.remove();
    }
}
